live by (one's) wits

Translations
жить за счет смекалки
He had to live by his wits after losing his job.
Ему пришлось жить за счет смекалки после потери работы.
Definitions
To survive or succeed by using one's intelligence, resourcefulness, or cleverness, especially in difficult or challenging situations, often without stable resources or support.